autocmd BufEnter * call Formatter()
function! Formatter()
	if &filetype == "xml"
		nmap ,x :% !C:/Vim/vim73/xmllint-1.0.exe %<CR>
	elseif &filetype == "php"
		nmap ,x :% !C:/Vim/vim73/phpCB.exe --space-after-if --space-after-switch --space-after-while --space-before-start-angle-bracket --extra-padding-for-case-statement --glue-amperscore --change-shell-comment-to-double-slashes-comment --force-large-php-code-tag --force-true-false-null-contant-lowercase --comment-rendering-style PEAR --equal-align-position 50 --padding-char-count 4 %<CR>
	elseif &filetype == "python"
		nmap ,x :% !python C:/Vim/vim73/PythonTidy-1.22.python %<CR>
	elseif &filetype == "h" || &filetype == "hpp" || &filetype == "hxx" || &filetype == "c" || &filetype == "cpp" || &filetype == "cxx" || &filetype == "java"
		nmap ,x :% !C:/Vim/vim73/AStyle.exe --style=java --add-brackets -j --align-pointer=name -k3 --align-reference=name -W3 --pad-oper -p --pad-header -H --indent-preprocessor -w --max-instatement-indent=-M %<CR>
	endif
endfunction
